<template>
  <div>
    <el-card>
      <el-page-header @back="$router.back()" content="表单回车提交" />
    </el-card>

    <el-card class="mt-20">
      <el-form :model="form" size="mini" label-position="top" @submit.native.prevent>
        <el-form-item label="项目1">
          <el-input
            v-model="form.prop1"
            placeholder="请输入"
            maxlength="50"
          ></el-input>
        </el-form-item>
        <el-form-item label="项目2">
          <el-select
            v-model="form.prop2"
            placeholder="请输入"
            class="full-width"
          >
            <el-option :value="1" label="选项1"></el-option>
            <el-option :value="2" label="选项2"></el-option>
            <el-option :value="3" label="选项3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="项目3">
          <el-radio-group
            v-model="form.prop3"
          >
            <el-radio :label="1">参数1</el-radio>
            <el-radio :label="2">参数2</el-radio>
            <el-radio :label="3">参数3</el-radio>
            <el-radio :label="4">参数4</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="项目4">
          <el-input
            v-model="form.prop4"
            placeholder="请输入"
            maxlength="50"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" native-type="submit" @click="submit">提交</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {},
    };
  },
  methods: {
    submit() {
      this.$message.success(JSON.stringify(this.form))
    }
  },
};
</script>

<style></style>
